import request from "@/request/request.js";

// 获取盘点任务列表

export const getInventoryTaskList = (data) => {
  return request.get(`/admin-api/inventory/check/page?${data}`);
};
// 确认单据
export const checkInventoryTaskList = (data) => {
  return request.get(`/admin-api/inventory/check/check?${data}`);
};

// 删除盘点任务

export const deleteInventoryTask = (data) => {
  return request.del(`/admin-api/inventory/check/delete?${data}`);
};

// 盘点单据关闭
export const closeInventoryTask = (data) => {
  return request.get(`/admin-api/inventory/check/close?${data}`);
};

// 盘点详情基础数据
export const getInventoryTaskDetailsBase = (data) => {
  return request.get(`/admin-api/inventory/check/get?${data}`);
};

// 获取货架列表
export const getRackList = (data) => {
  return request.get(`/admin-api/inventory/check/get-rack-list?${data}`);
};

// 获取货架对应名称字典
//参数 [5, 1];
export const getRackCodeMap = (data) => {
  return request.post(
    `/admin-api/inventory/storage-rack/get-rack-code-map-by-rack-ids`,
    data
  );
};

// 获取盘点详情列表
export const getInventoryTaskDetailsList = (data) => {
  return request.get(`/admin-api/inventory/check/get-bill-list?${data}`);
};

// 确认盘点
export const confirmInventory = (data) => {
  return request.post(`/admin-api/inventory/check/confirm`, data);
};
